package com.ym.manager.admin.user.model;

import com.ym.manager.yinsheng.util.YsKJEnum;
import com.ym.utils.StringHandler;

import java.util.Map;

/**
 * @Author 但何非
 * @Date 2022/12/8 10:11
 * @ClassName: RedVo
 * @Description:
 * @Version:
 */
public class TransferVo {

    public long id;
    public String raw_add_time;
    public long user_id;
    public String outNickName;
    public String outAvatarUrl;
    public String list_user_id;
    public String nickName;
    public String avatarUrl;
    public String amount;
    public String type;
    public int status;
    public String statusStr;
    public TransferVo() {

    }
    public TransferVo(Map<String, Object> o) {
        this.id = StringHandler.getLong(o.get("id"));
        this.raw_add_time = StringHandler.getString(o.get("raw_add_time"));
        this.user_id = StringHandler.getLong(o.get("user_id"));
        this.outNickName = StringHandler.getString(o.get("outNickName"));
        this.outAvatarUrl = StringHandler.getString(o.get("outAvatarUrl"));
        this.list_user_id = StringHandler.getString(o.get("list_user_id"));
        this.nickName = StringHandler.getString(o.get("nickName"));
        this.avatarUrl = StringHandler.getString(o.get("avatarUrl"));
        this.amount = StringHandler.fenToYuan(StringHandler.getString(o.get("amount")));
        this.type = YsKJEnum.RedPackageStatus.getDescByCode(StringHandler.getString(o.get("type")));
        this.statusStr = YsKJEnum.RedPackageStatus.getDescByCode(StringHandler.getString(o.get("status")));
        this.status = StringHandler.getInt(o.get("status"));
    }
}
